/**
 * @category base64格式转Blob格式
 * @description  base64格式转Blob格式
 * @param data {string}
 * @example base64toBlob(data) => uInt8Array
 */

export default function base64toBlob(data: string) {
    const raw = window.atob(data);
    const rawLength = raw.length;
    const uInt8Array = new Uint8Array(rawLength)
    for (let i = 0; i < rawLength; ++i) {
        uInt8Array[i] = raw.charCodeAt(i)
    }
    return uInt8Array
}
